package com.five.calendar.ui.widget.picktime;

import android.content.Context;

import com.five.calendar.ui.widget.picktime.bean.DateType;

import java.util.Date;

/**
 * Created by zhuxiaoxinsx on 17-8-29.
 */

public class DatePickDialogHelper {

    public static void showDatePickDialog(Context context, OnSureLisener lisener) {
        DatePickDialog dialog = new DatePickDialog(context);
        //设置上下年分限制
        dialog.setYearLimt(40);
        //设置标题
        dialog.setTitle("选择时间");
        //设置类型
        dialog.setType(DateType.TYPE_YMDHM);
        //设置消息体的显示格式，日期格式
        dialog.setMessageFormat("yyyy-MM-dd HH:mm");
        //设置选择回调
        dialog.setOnChangeLisener(null);
        //设置点击确定按钮回调
        dialog.setOnSureLisener(lisener);
        dialog.show();
    }

}
